class UrlMappings {

	static mappings = {
            
                "/login/forgot"(controller:"login"){
                        action = [PUT:"updateResetPassword"]
                        constraints {
                                // apply constraints here
                        }
		}
            
                "/login/"(controller:"login"){
                        action = [PUT:"update"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                
                
                "/product/wine/$id?/"(controller:"product"){
                        action = [GET:"showWine", POST:"saveWine", PUT:"updateWine", DELETE:"removeWine"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                "/product/gift/$id?/"(controller:"product"){
                        action = [GET:"showGift", POST:"saveGift", PUT:"updateGift", DELETE:"removeGift"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                "/product/hamper/$id?/"(controller:"product"){
                        action = [GET:"showHamper", POST:"saveHamper", PUT:"updateHamper", DELETE:"removeHamper"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                "/product/search/"(controller:"product"){
                        action = [GET:"showSearch"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                "/product/$productId/productOption/"(controller:"productOption"){
                        action = [GET:"showByProduct"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                "/product/$id?/"(controller:"product"){
                        action = [GET:"showAll", POST:"saveAll", PUT:"updateAll", DELETE:"removeAll"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                
                "/productOption/$id?"(controller:"productOption"){
                        action = [GET:"show"]
                        constraints {
                                // apply constraints here
                        }
		}
                
        
                "/customer/$id/activate"(controller:"customer"){
                        action = [GET:"activateCustomer"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                
                "/cart/$cartId/item/$itemId?/"(controller:"cartItem"){
                        action = [GET:"show", POST:"save", PUT:"update", DELETE:"remove"]
                        constraints {
                                // apply constraints here
                        }
		}
                // for login use only
                "/customer/$customerId/cart/"(controller:"shoppingCart"){
                        action = [GET:"showByCustomerId", POST:"save"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                
                "/cart/$cartId?/"(controller:"shoppingCart"){
                        action = [GET:"show", PUT:"update", DELETE:"remove"]
                        constraints {
                                // apply constraints here
                        }
		}
                
                
//		"/$controller/$action?/$id?"{
                "/$controller/$id?/"{
                        action = [GET:"show", POST:"save", PUT:"update", DELETE:"remove"]
                        constraints {
                                // apply constraints here
                        }
		}
                
		"/"(view:"/index")
		"500"(view:'/error')
        
        
                // third-party APIs
                "/awsSes"(controller:"awsSes",action:"sendPlainTextMail")
                "/sesTest"(controller:"sesTest",action:"sendPlainTextMail")

                //payment                
                 "/totalprice"(controller:"payment",action:"getTotalPrice")
         
                "/success"(controller:"payment",action:"success")
    
    }
}
